using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._MultidimensionTools._NetCDF
{
    /// <summary>
    /// <para>Raster to NetCDF</para>
    /// <para>Converts a raster dataset to a netCDF file.</para>
    /// <para>将栅格数据集转换为 netCDF 文件。</para>
    /// </summary>    
    [DisplayName("Raster to NetCDF")]
    public class RasterToNetCDF : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RasterToNetCDF()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input Raster</para>
        /// <para>The input raster dataset.</para>
        /// <para>输入栅格数据集。</para>
        /// </param>
        /// <param name="_out_netCDF_file">
        /// <para>Output netCDF File</para>
        /// <para>The output netCDF file. The file name must have an .nc extension.</para>
        /// <para>输出 netCDF 文件。文件名必须具有 .nc 扩展名。</para>
        /// </param>
        public RasterToNetCDF(object _in_raster, object _out_netCDF_file)
        {
            this._in_raster = _in_raster;
            this._out_netCDF_file = _out_netCDF_file;
        }
        public override string ToolboxName => "Multidimension Tools";

        public override string ToolName => "Raster to NetCDF";

        public override string CallName => "md.RasterToNetCDF";

        public override List<string> AcceptEnvironments => ["scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _out_netCDF_file, _variable, _variable_units, _x_dimension, _y_dimension, _band_dimension, _fields_to_dimensions, _compression_level];

        /// <summary>
        /// <para>Input Raster</para>
        /// <para>The input raster dataset.</para>
        /// <para>输入栅格数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output netCDF File</para>
        /// <para>The output netCDF file. The file name must have an .nc extension.</para>
        /// <para>输出 netCDF 文件。文件名必须具有 .nc 扩展名。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output netCDF File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_netCDF_file { get; set; }


        /// <summary>
        /// <para>Variable</para>
        /// <para>The netCDF variable name that will be used in the output netCDF file. This variable will contain the values of cells in the input raster.</para>
        /// <para>将在输出 netCDF 文件中使用的 netCDF 变量名称。此变量将包含输入栅格中像元的值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Variable")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _variable { get; set; } = null;


        /// <summary>
        /// <para>Variable Units</para>
        /// <para>The units of the data contained within the variable. The variable name is specified in the Variable parameter.</para>
        /// <para>变量中包含的数据单位。变量名称在 Variable 参数中指定。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Variable Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _variable_units { get; set; } = null;


        /// <summary>
        /// <para>X Dimension</para>
        /// <para>The netCDF dimension name that will be used to specify x, or longitude, coordinates.</para>
        /// <para>将用于指定 x 或经度坐标的 netCDF 维度名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("X Dimension")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _x_dimension { get; set; } = null;


        /// <summary>
        /// <para>Y Dimension</para>
        /// <para>The netCDF dimension name that will be used to specify y, or latitude, coordinates.</para>
        /// <para>将用于指定 y 或纬度坐标的 netCDF 维度名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Y Dimension")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _y_dimension { get; set; } = null;


        /// <summary>
        /// <para>Band Dimension</para>
        /// <para>The netCDF dimension name that will be used to specify bands.</para>
        /// <para>将用于指定波段的 netCDF 维度名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Band Dimension")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _band_dimension { get; set; } = null;


        /// <summary>
        /// <para>Fields to Dimensions</para>
        /// <para><xdoc>
        ///   <para>The field or fields used to create dimensions in the netCDF file.</para>
        ///   <bulletList>
        ///     <bullet_item>Field—A field in the input raster attribute table.</bullet_item><para/>
        ///     <bullet_item>Dimension—The netCDF dimension name</bullet_item><para/>
        ///     <bullet_item>Units—The units of the data represented by the field</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于在 netCDF 文件中创建维度的一个或多个字段。</para>
        ///   <bulletList>
        ///     <bullet_item>字段 - 输入栅格属性表中的字段。</bullet_item><para/>
        ///     <bullet_item>维度 - netCDF 维度名称</bullet_item><para/>
        ///     <bullet_item>单位 - 字段表示的数据单位</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Fields to Dimensions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _fields_to_dimensions { get; set; } = null;


        /// <summary>
        /// <para>Compression Level</para>
        /// <para>The level at which the output netCDF file will be compressed. The default value is 0, which implies no compression. A value of 9 represents maximum compression.</para>
        /// <para>将压缩输出 netCDF 文件的级别。默认值为 0，这意味着没有压缩。值 9 表示最大压缩。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compression Level")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _compression_level { get; set; } = 0;


        public RasterToNetCDF SetEnv(object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}